﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default3.aspx.cs" Inherits="Default3" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>

    <script src="http://localhost:2011/didong/js/jquery.js" type="text/javascript"></script>
    <script src="http://localhost:2011/didong/js/gold.js" type="text/javascript"></script>
    
    <script type="text/javascript">
        $(document).ready(function(){
            
                        function showrate()
                        {
                            var irate = '';
                            irate += '<div class = "row"> <div class="col1"> Loại</div><div class="col1"> Mua </div> <div class="col1" style = "border-right: none;"> Bán </div> </div>';
                            for(var i=0;i<rate.length;i++)
                            {
                                irate += '<div class = "row"> <div class="col1"> ' + rate[i][0] + '</div><div class="col1"> ' + rate[i][4] + '</div> <div class="col1"  style = "border-right: none;"> ' + rate[i][2] + '</div> </div>';
                            }
                            irate +=  '<center><span class="ppost"><i>(Cập nhật ' + time_gold + ')</i></span></center>' ;
                            document.getElementById("tigiangoaite").innerHTML =  irate;
                            // Gia vang
                            irate = '';
                            irate += '<div class = "row"> <div class="col1"> Loại</div><div class="col1"> Mua </div> <div class="col1" style = "border-right: none;"> Bán </div> </div>';
                            for(var i=0;i<gold.length;i++)
                            {
                                irate += '<div class = "row"> <div class="col1"> ' + gold[i][0] + '</div><div class="col1"> ' + gold[i][1] + '</div> <div class="col1" style = "border-right: none;"> ' + gold[i][2] + '</div> </div>';
                            }
                            irate +=  '<center><span class="ppost"><i>(Cập nhật ' + time_gold + ')</i></span></center>' ;
                            document.getElementById("tigiavang").innerHTML =  irate;
                        }
                        showrate();
                        $('.tigiavang').hide();
                       
                        $('a.itab').click(function(){
                            $('.itabcontent').hide();
                            $('.iactive').removeClass('iactive');
                            $(this).parent().addClass('iactive');
                            var ilink=$(this).attr('title');
                            $('#'+ilink).show();
                            return false;
                        });
                   });
    </script>
    <style type="text/css">
        .col1{ width: 55px; height:25px; float: left; font-size: 13px; text-align: center; border-right: solid 1px #f17eca}
        .row{ width: 180px; padding:0px 5px; height: 25px; clear:both; border-bottom:solid 1px #f17eca}
        .tabcontent{}
         ul.tab-headers{ list-style: none; width: 192px; height:30px; padding:0px; margin:0;}
         ul.tab-headers li{ float: left; width: 95px; height: 24px; text-align: center; font-size:17px;  display: inline; padding-top:5px; margin:0}
         ul.tab-headers li:hover{  background: #ebebeb}
         a.itab{ text-decoration: none; width: 96px; height: 100%}
         .ppost{ font-size: 13px;}
         .iactive{ background:#e0e0e0; border: solid 1px #f17eca;}
         .itabcontent{ background: #e0e0e0}
        #tigiangoaite{ border: solid 1px #f17eca; width:190px; margin:0}
        #tigiavang{ border: solid 1px #f17eca; width:190px; display: none}
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div id="tienvavang">
         <ul class="tab-headers">
            <li id="tab-header1" class="iactive"><a href="#" class="itab" title="tigiangoaite">Ngoại tệ</a></li>
            <li id="tab-header2"><a href="" class="itab" title="tigiavang">Giá vàng</a></li>
         </ul>
         <div id="tigiangoaite" class="itabcontent"></div>
         <div id="tigiavang" class="itabcontent"></div>

    </div>
    </form>
</body>
</html>
